package xxhui.space.newsclient.Http;

import io.reactivex.Observable;
import xxhui.space.newsclient.Bean.News;
import xxhui.space.newsclient.Bean.UserData;

/**
 * Created by home on 2017/8/3.
 */

public class NewsLoader extends ObjectLoader {
    private NewsService mNewsService;
    public NewsLoader(){
        mNewsService = RetrofitServiceManager.getInstance().create(NewsService.class);
    }

    public Observable<UserData> login(String userName, String pwd){
        return observe(mNewsService.login(userName,pwd));
    }

    public Observable<News> getArticle(int page ,int page_size){
        return observe(mNewsService.getArticle(page,page_size));
    }

    public Observable<UserData> modifyNickName(String nickname){
        return observe(mNewsService.modifyNickName(nickname));
    }



}
